﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlAllSaleForce.ascx.cs" Inherits="WebUserControl_ControlAllSaleForce" %>
<%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc2" %>

<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPivotGrid" tagprefix="dxwpg" %>


<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2.Export, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.XtraPivotGrid.Web" tagprefix="dxpgw" %>

<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2" namespace="DevExpress.Web.ASPxPivotGrid" tagprefix="dxwpg" %>
<link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/K_BaoCaoFormLayout.css")%>' type="text/css" />


 <script type="text/javascript">
     function pageLoad() {
       $("#<%= Button1.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none',
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
        $("#<%= Button2.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff'
        } }); 
         setTimeout($.unblockUI, 7000); 
        }); 
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        }  
   
</script>  

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:PostBackTrigger ControlID="Button2" /></Triggers>
<ContentTemplate>
<uc2:uscMsgBox ID="uscMsgBox1" runat="server" />
<fieldset>
    <legend>ALL SALES FORCE</legend>
    <div class="fm-req">
      <label for="txtFromDate">Chọn thời gian:</label>
      <asp:DropDownList ID="DropDownListDateReport" runat="server" Width="150px">
            </asp:DropDownList>
    </div> 
    </fieldset>
    <div>
    <asp:RadioButtonList ID="rbl1" runat="server"  
        ToolTip="Lựa chọn chỉ số">     
            <asp:ListItem Text="ALL" Value="0"></asp:ListItem>     
            <asp:ListItem Text="BA có doanh số" Value="1" Selected="True"></asp:ListItem>  
            <asp:ListItem Text="BUM(*)" Value="2"></asp:ListItem>  
        </asp:RadioButtonList> 
    
    </div>
    <div>
    <asp:Button ID="Button1" runat="server" Text="Xem báo cáo" 
                onclick="Button1_Click" />
&nbsp;&nbsp;
            <asp:Button ID="Button2" runat="server" Text="Xuất ra Excel" 
                onclick="Button2_Click" />
    </div>


    <br />
    <dxwpg:ASPxPivotGrid ID="ASPxPivotGrid1" runat="server">
        <optionsview showdataheaders="False" showrowgrandtotals="False" 
            showrowtotals="False" />
             <Fields>
          <dxwpg:PivotGridField HeaderStyle-BackColor="Yellow" ID="PivotGridField1" Area="FilterArea" AreaIndex="0" Caption="Báo cáo All Sales Force" 
                     FieldName="Baocao" Visible="True">
                 </dxwpg:PivotGridField>
                 
                 <dxwpg:PivotGridField HeaderStyle-BackColor="Yellow" ID="PivotGridField4" Area="FilterArea" AreaIndex="3" Caption="Giờ : " 
                     FieldName="Time" Visible="True">
                 </dxwpg:PivotGridField>
            </Fields> 
    </dxwpg:ASPxPivotGrid>


    <dxpgw:ASPxPivotGridExporter ID="ASPxPivotGridExporter1" ASPxPivotGridID="ASPxPivotGrid1" runat="server">
    </dxpgw:ASPxPivotGridExporter>
   
    </ContentTemplate>
</asp:UpdatePanel>


